/*
 * Project: yygh-parent
 *
 * File Created at 2023/7/25
 *
 * 自定义时间格式代替DATE标签：2023-07-25 19:08:19:08
 */
package com.atguigu.yygh.order.controller;

import com.atguigu.yygh.common.result.Result;

import com.atguigu.yygh.order.service.DepartmentService;
import com.atguigu.yygh.vo.hosp.DepartmentVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 用户名
 * @Type DepartmentController.java
 * @Desc
 * @date 2023/7/25 19:08
 */
@Api("科室管理接口")
@RestController
//@CrossOrigin
@RequestMapping("/admin/hosp/hospital")
@Slf4j
public class DepartmentController {
    @Autowired
    DepartmentService departmentService;
    @ApiOperation(value = "查看全部科室信息")
    @GetMapping("getDeptList/{hoscode}")
    public Result show(
            @ApiParam(name = "hoscode", value = "hoscode", required = true)   @PathVariable String hoscode) {
        List<DepartmentVo> departments=departmentService.selectAllByHoscode(hoscode);
        return Result.ok(departments);
    }


}


/**
 * Revision history
 * -------------------------------------------------------------------------
 * <p>
 * Date Author Note
 * -------------------------------------------------------------------------
 * 2023/7/25 用户名 create
 */ 
